/**
 * 
 */
package com.myBase.core.dao;

import java.math.BigDecimal;
import java.util.Date;
import java.util.HashMap;
import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.myBase.core.entity.GoldcoinActivitycashpool;
import com.myBase.common.persistence.CrudDao;
import com.myBase.common.persistence.annotation.MyBatisDao;

/**
 * 活动资金池表DAO接口
 * @author 活动资金池表
 * @version 2017-05-04
 */
@MyBatisDao
public interface GoldcoinActivitycashpoolDao extends CrudDao<GoldcoinActivitycashpool> {
    public List<GoldcoinActivitycashpool> getgoldCoinActivity(@Param("branchid") String branchid);

    // 金币结算
    public int updateSettlement(@Param("leftAmount") BigDecimal leftAmount,
            @Param("totalAmount") BigDecimal totalAmount, @Param("activityId") Integer activityId);

    /**
     * * getALLGoldActivity(获取所有活动)
     * 
     * @param
     * @return List<HashMap<String,Object>>
     * @Exception
     */
    public List<HashMap<String, Object>> getALLGoldActivity(String branchid);

    public Integer updateActivityCash(@Param("add") BigDecimal add, @Param("date") Date date,
            @Param("goldcoinactivity") String goldcoinactivity);

    //根据activityId和branchId 搜索数据库中满足条件的列表，实际上，应该只有一条数据
    public List<GoldcoinActivitycashpool> getBeanByActivityAndBranchId(@Param("activityId") String activityId,
            @Param("branchId") String branchId);

    public HashMap<String, Object> getCanUseCash(@Param("activityId") Integer activityId);

    public int updateBySelf(GoldcoinActivitycashpool goldcoinActivitycashpool);

}